package base;


import javax.swing.*;
import java.awt.*;

public abstract class BaseCanvasWindow extends BaseWindow {

    protected abstract String setCanvasTitle();
    protected abstract Canvas setCanvasContent();

    private Canvas drawArea;
    private JPanel jp1;

    @Override
    protected JFrame setRootView() {
        JFrame fm1 = new JFrame(setCanvasTitle());
        fm1.setBounds(450, 180, 500, 350);
        return fm1;
    }

    @Override
    protected void initView(JFrame root) {
        drawArea = setCanvasContent();
        drawArea.setPreferredSize(new Dimension(200, 250));
        drawArea.setBackground(Color.WHITE);
        drawArea.setBounds(125, 0, 250, 250);

        jp1 = new JPanel();
        jp1.add(drawArea);
        jp1.setLayout(null);
        jp1.setBackground(Color.WHITE);

        root.add(jp1);
    }

    @Override
    protected void loadData() {

    }

}
